package game.gui.buttons;

import game.MainGame.WorldMemoryGame;
import game.jabberclient.Question;

import java.awt.Color;
import javax.swing.JOptionPane;

public class ScienceLbl extends FirstLbl {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public ScienceLbl(int i, WorldMemoryGame w) {
		super(i, w);
		color = new Color(154, 205, 50);
		this.setBackground(color);
		this.name = "science";
	}

	@Override
	public boolean popQuestion(WorldMemoryGame w) {
		Question quest = new Question("Science");
		String question = quest.getQuestion();
		Object[] options = quest.getOptions();
		rightAnswer = quest.getRightAnswer();
		int n = JOptionPane.showOptionDialog(w, question, "Science question",
				JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
				null, options, null);

		if (n == rightAnswer) {
			return true;
		}
		return false;
	}

}
